<?php
namespace app\common\validate\Product;

use think\Validate;
class Type extends Validate
{
    protected $rule = [
        'name' => ['require','unique:product_type'],
        'weigh' => ['require'],
    ];

    // 错误提示信息
    protected $message = [
        'name.require' => '分类名称必填',
        'name.unique' => '分类名称已存在',
        'weigh.require' => '权重必填'
    ];
}